package com.guigu.service.impl;

import com.guigu.dto.roleDTO;
import com.guigu.dto.rolemenuDTO;
import com.guigu.entity.role;
import com.guigu.mapper.roleMapper;
import com.guigu.service.roleService;
import com.guigu.vo.cdVO;
import com.guigu.vo.qxVO;
import com.guigu.vo.roleVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class roleServicelmpl implements roleService {

    @Autowired
    private roleMapper rolemapper;

    @Override
    public List<roleVO> query(roleDTO dto) {
        return this.rolemapper.query(dto);
    }

    @Override
    public int add(role ro) {
        return this.rolemapper.add(ro);
    }

    @Override
    public int update(role ro) {
        return this.rolemapper.update(ro);
    }

    @Override
    public List<cdVO> querymenu(rolemenuDTO ro) {
        return this.rolemapper.querymenu(ro);
    }

    @Override
    public List<cdVO> queryzmenu(rolemenuDTO ro) {
        return this.rolemapper.queryzmenu(ro);
    }

    @Override
    public int maxid() {
        return this.rolemapper.maxid();
    }

    @Override
    public int addacrole(int id) {
        return this.rolemapper.addacrole(id);
    }

    @Override
    public int deleterolemenu(rolemenuDTO ro) {
        return this.rolemapper.deleterolemenu(ro);
    }

    @Override
    public int insertrolemenu(rolemenuDTO ro) {
        return this.rolemapper.insertrolemenu(ro);
    }

    @Override
    public List<qxVO> queryqx(rolemenuDTO ro) {
        return this.rolemapper.queryqx(ro);
    }

    @Override
    public List<qxVO> queryzqx(rolemenuDTO ro) {
        return this.rolemapper.queryzqx(ro);
    }

    @Override
    public int deleteRoleauth(rolemenuDTO ro) {
        return this.rolemapper.deleteRoleauth(ro);
    }

    @Override
    public int insertRoleauth(rolemenuDTO ro) {
        return this.rolemapper.insertRoleauth(ro);
    }


}
